package com.china08.yxyapi.model;

import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort.Direction;

public class YxyApiPageReqModel extends YxyApiReqModel {

    public int page = 0;

    public int size = 10;

    private Pageable pageable;

    public Pageable getPageable(Direction direction, String... sort) {
        pageable = new PageRequest(page, size, direction, sort);
        return pageable;
    }

}
